/*
day155
2020.1.30
*/
#include<iostream>
#include<string>
#include<unordered_map>
using namespace std;


class Solution {
public:
    int maxNumberOfBalloons(string text) {
        unordered_map<char,int> m;
        for(const auto &ch : text)
        {
        	++m[ch];
		}
		m['l']/=2;
		m['o']/=2;
		
		int res=text.size();
		string str="balloon";
		for(const auto &ch : str)
		{
			int time=m[ch];
			if(time<res)
			{
				res=time;
			}
		}
		return res;
    }
};

int main()
{
	return 0;
}
